
#pragma once

#include "app_config.hpp"


enum class motion_request {
    none,
    front,
    back,
    left,
    right,
    left_hand,
    right_hand,
    sit_down,
    lie_down,
    sleep,
    free,
    no_free,
    shake,
    test,
};


constexpr motion_request MOTION_LIST[] = {
    motion_request::front,
    motion_request::back,
    motion_request::left,
    motion_request::right,
    motion_request::left_hand,
    motion_request::right_hand,
    motion_request::sit_down,
    motion_request::lie_down,
    motion_request::sleep,
    motion_request::shake,
};


constexpr int MOTION_COUNT = 10;


enum class display_request {
    none,
    hi,
    angry,
    eda,
    err,
    dowhat,
    love,
    sick,
    yun,
    weather,
    time,
    ip,
};


bool motion_rejected();

motion_request motion_requested();

display_request display_requested();

display_request current_display();

void set_current_display(display_request m);

void init_server();

void init_ntp_client();

TimeType task_update_ntp();

TimeType task_update_weather();

void display_time();

void display_weather();

void display_control_ip();

TimeType task_wifi_connection_monitor();

void start_ap();

bool load_param();

void try_connect_wifi();

void init_web_interface();
